<?php
/**
 *User :门前一棵柿子树
 *Date:2024/4/14
 *Email:785313152@qq.com
 */

namespace app\index\model;

use think\Model;

class ProposeLog extends Model
{

    public function addLog($propose_id,$content=''){
        $option_id =session('user_info.userid');
        $user_name = session('user_info.name');
        $avatar = session('user_info.avatar');
        $data = compact('option_id','user_name','avatar','content','propose_id');
        $data['content'] = $user_name.':'.$data['content'];
        $data['add_time'] = date('Y-m-d H:i:s');
        $this->save($data);
    }

}